<%-- 
    Document   : classroom
    Created on : 6-dec-2011, 11:27:43
    Author     : woutermkievit
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>classroom</title>
        <script>
            flag=true;
            function onclose(){
                if(flag&&document.getElementById("ist").value=="true"){
                    
                    window.open("Menu?redirection=stopclassroom","_blank");
                    alert("stop by presing the stop button in the upper right corner");
                }
            }
            function stopclass(){
                flag=false;
                window.location ="Menu?redirection=stopclassroom";
            }
            </script>
    </head>
    <body onbeforeunload='onclose()'>
        <input id="ist" type="hidden" value="${isTeacher}"></input>
                This is the classroom ${coursename}
    <c:if test="${isTeacher==true}"><div id="stopclassroom" style="position: absolute;top:2px;right:2px;"><input onclick="stopclass()" type='submit' value="stop classroom"/></div></c:if>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="pdlvirtulclassroom">
                <param name="movie" value="${swf}" />
                <param name="quality" value="high" />
                <param name="bgcolor" value="#ffffff" />
                <param name="allowScriptAccess" value="sameDomain" />
                <param name="allowFullScreen" value="true" />
                <param name="flashVars" value="name=${name}&course=${coursename}"/>
                <param name="test" value="testpdl"/>

                <object type="application/x-shockwave-flash" data="${swf}" width="100%" height="100%">
                    <param name="quality" value="high" />
                    <param name="bgcolor" value="#ffffff" />
                    <param name="allowScriptAccess" value="sameDomain" />
                    <param name="allowFullScreen" value="true" />
                    <param name="flashVars" value="name=${name}&course=${coursename}"/>
                
                </object>
            </object>
    </body>
</html>
